package com.example.takeoff.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateChange
{
    public static Date DateChange(String strTime)
    {
        //String strTime = "2019-06-10 17:32:05";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = null;
        try
        {
            date = simpleDateFormat.parse(strTime);
        }
        catch (ParseException e)
        {
            e.printStackTrace();
        }
        System.out.println(date);  // Mon Jun 10 17:32:05 GMT+08:00 2019
        return date;
    }

}
